Skip to content

Fix function is deprecated #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Fix function is deprecated #4

wants to merge 1 commit into from

Conversation

ghost
Copy link

@ghost ghost commented Feb 16, 2019

 Error: octokit.authenticate() is deprecated. Use "auth" constructor option instead.
at authenticate (/app/node_modules/@octokit/rest/plugins/authentication-deprecated/authenticate.js:4:26)
at exports.gitCommitPush (/app/node_modules/git-commit-push-via-github-api/lib/git-commit-push-via-github-api.js:126:16)

Copy link
Owner

@azu azu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for PR.
I've commented

@@ -150,7 +150,7 @@ export const gitCommitPush = (options: GitCommitPushOptions) => {
}
const gitHub = new GitHubApi();
if (token) {
gitHub.authenticate({
gitHub.auth({
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/octokit/rest.js/#authentication
This deprecation message means that use auth option of Constructor like following.

const gitHub = new GitHubApi({ 
  auth: "token secret"
});

@azu azu added the duplicate label Feb 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant